package com.house.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.house.entity.Building;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface BuildingMapper extends BaseMapper<Building> {

    @Select("select building_id, user_id, building_name, legal_person, phone, area_id, create_time, update_time from building where building_id = #{buildingId}")
    Building selectByBuildingId(Long buildingId);

    @Delete("delete from building where building_id = #{buildingId}")
    int delete(Long buildingId);
}
